package ua.cn.store.service;

import java.util.List;

import ua.cn.store.domain.Book;
import ua.cn.store.domain.Genres;

public interface IBookService extends IGenericService<Book>{
	
	/**
	 * Find all books by author
	 * @param author
	 * @return list of books
	 * @throws IllegalArgumentException if parameter is <code>null</code>
	 * @throws GeneralServiceException if DB error occurs
	 */
	public List<Book> getBookByAuthor(String author) 
	throws IllegalArgumentException, GeneralServiceException;	
	
	/**
	 * Find all books by genre
	 * @param genre
	 * @return list of books
	 * @throws IllegalArgumentException if parameter is <code>null</code>
	 * @throws GeneralServiceException if DB error occurs
	 */
	public List<Book> getBookByGenre(Genres genre)
	throws IllegalArgumentException, GeneralServiceException;	
	
	/**
	 * Find all books by name
	 * @param name
	 * @return list of books
	 * @throws IllegalArgumentException if parameter is <code>null</code>
	 * @throws GeneralServiceException if DB error occurs
	 */
	public List<Book> getBookByName(String name)
	throws IllegalArgumentException, GeneralServiceException;
	
	}
